<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<!-- navigator 可以导航到另一个页面 -->
			<navigator url="/subpkgs/search/search">
				<!-- #ifndef H5 -->
				<text class="title">首页</text>
				<!-- #endif -->
				<!-- #ifdef H5 -->
				<text class="title">H5搜索</text>
				<!-- #endif -->
			</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(){
			// #ifdef H5
			setTimeout(()=>{
				alert("H5页面加载完成");
			},1000);
			// #endif
			// #ifndef H5
			console.log("进入非H5页面");
			// #endif
			console.log(this.$config.baseApi);
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}
	/*
	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}*/
	/* #ifdef H5*/
	.title{
		font-size: 36rpx;
		color: red;
	}
	/* #endif */
	/*#ifndef H5 */
	.title{
		font-size: 36rpx;
		color: blue;
	}
	/*#endif */
</style>
